package june.test_6_20;

import java.util.Scanner;

public class TestMain {
    public static void main(String[] args) {
        int[] as = new int[5];
        int[] bs = new int[5];
        int[] cs = new int[5];
        int[] ds = new int[5];
        Scanner scanner = new Scanner(System.in);
        for (int i = 0; i < 5; i++) {
            as[i] = scanner.nextInt();
        }
        for (int i = 0; i < 5; i++) {
            bs[i] = scanner.nextInt();
        }
        for (int i = 0; i < 5; i++) {
            cs[i] = scanner.nextInt();
        }
        for (int i = 0; i < 5; i++) {
            ds[i] = scanner.nextInt();
        }
        boolean tmp = true;
        int a = 0;
        int b = 0;
        while (true) {
            if(a > 4 || b > 4) {
                if(a > b) {
                    System.out.println("lose");
                    System.out.println(5 - b);
                } else {
                    System.out.println("win");
                    System.out.println(5 - a);
                }
                break;
            }
            if(tmp) {
                while (a < 5 && bs[a] <= 0) {
                    a++;
                }
                while (b < 5 && ds[b] <= 0) {
                    b++;
                }
                if(a < 5 && b < 5) {
                    ds[b] -= as[a];
                    tmp = false;
                }
            } else {
                while (a < 5 && bs[a] <= 0) {
                    a++;
                }
                while (b < 5 && ds[b] <= 0) {
                    b++;
                }
                if(a < 5 && b < 5) {
                    bs[a] -= cs[b];
                    tmp = true;
                }
            }
        }
    }
}
